Conversation
pino 로거와 공유 타입(HealthResponse)을 shared 패키지로 분리. tsconfig.json 추가로 독립 빌드 가능하도록 구성. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fastify 기본 logger 대신 shared pino 로거를 주입하고, health 엔드포인트 응답에 HealthResponse 타입을 적용. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
deps 스테이지를 추가해 production node_modules(--omit=dev)와 빌드용 node_modules를 분리. shared도 dist만 복사하도록 개선. node_modules 48.6MB → 20.1MB, 이미지 212MB → 147MB. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3-stage 구조 설명, 실측 이미지 크기 비교(naive/optimized/prod), npm workspaces 심링크 동작 원리, packages/shared 사전 조건 추가. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
api/db 로컬 개발환경 구성. service_healthy로 DB 준비 후 api 시작, healthcheck, env_file 분리. .env.example로 필요 변수 문서화. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
domain/item.ts에 순수 계약(타입+인터페이스) 분리. AppError 중앙화, pgItemRepository는 domain 인터페이스 구현체로 분리. service는 domain 인터페이스만 의존해 DB 구현체와 결합 없음. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
POST/GET/PUT/DELETE /items 구현. Fastify JSON schema로 name(minLength:1, maxLength:255) validation, PUT 빈 body 거절(minProperties:1). schema는 schemas/ 디렉토리로 분리. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
id, name, description, view_count, created_at, updated_at 컬럼. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app.ts에 buildApp 팩토리 분리(테스트 재사용 목적). index.ts는 listen만 담당. app.after()에서 pg Pool 꺼내 repo/service 조립. shared pino logger를 loggerInstance로 주입(타입 단언으로 호환). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Vitest + app.inject() 기반 통합 테스트 20케이스. POST/GET/PUT/DELETE 각 ECP 동치 클래스 + BVA 경계값(name 0/1/255/256자). beforeEach/afterEach로 테스트 격리, TRUNCATE로 DB 상태 초기화. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
레이어 구조를 domain/repositories/services/routes로 업데이트. 의존성 방향, 에러 처리 방식 추가. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add node-pg-migrate as runtime dependency - Add migrate script to package.json - Convert 001_create_items.sql to node-pg-migrate JS format - Copy migrations/ in Dockerfile runner stage for migrate container - Replace postgres:16-alpine + psql with api image + node-pg-migrate in docker-compose - Add service_completed_successfully condition so api starts after migration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Compare entrypoint script vs separate container approach - Document depends_on condition types and startup order - Include measured metrics (migrate time, image sizes) - Note K8s Job/InitContainer mapping for future migration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


작업 내용